package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchVideoMonitorMapper;
import com.ruoyi.system.domain.DispatchVideoMonitor;
import com.ruoyi.system.service.IDispatchVideoMonitorService;

/**
 * 视频监控Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchVideoMonitorServiceImpl implements IDispatchVideoMonitorService 
{
    @Autowired
    private DispatchVideoMonitorMapper dispatchVideoMonitorMapper;

    /**
     * 查询视频监控
     * 
     * @param videoMonitorId 视频监控主键
     * @return 视频监控
     */
    @Override
    public DispatchVideoMonitor selectDispatchVideoMonitorByVideoMonitorId(Long videoMonitorId)
    {
        return dispatchVideoMonitorMapper.selectDispatchVideoMonitorByVideoMonitorId(videoMonitorId);
    }

    /**
     * 查询视频监控列表
     * 
     * @param dispatchVideoMonitor 视频监控
     * @return 视频监控
     */
    @Override
    public List<DispatchVideoMonitor> selectDispatchVideoMonitorList(DispatchVideoMonitor dispatchVideoMonitor)
    {
        return dispatchVideoMonitorMapper.selectDispatchVideoMonitorList(dispatchVideoMonitor);
    }

    /**
     * 新增视频监控
     * 
     * @param dispatchVideoMonitor 视频监控
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchVideoMonitor(DispatchVideoMonitor dispatchVideoMonitor)
    {
        return dispatchVideoMonitorMapper.insertDispatchVideoMonitor(dispatchVideoMonitor);
    }

    /**
     * 修改视频监控
     * 
     * @param dispatchVideoMonitor 视频监控
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchVideoMonitor(DispatchVideoMonitor dispatchVideoMonitor)
    {
        return dispatchVideoMonitorMapper.updateDispatchVideoMonitor(dispatchVideoMonitor);
    }

    /**
     * 批量删除视频监控
     * 
     * @param videoMonitorIds 需要删除的视频监控主键
     * @return 结果
     */
    @Override
    public int deleteDispatchVideoMonitorByVideoMonitorIds(Long[] videoMonitorIds)
    {
        return dispatchVideoMonitorMapper.deleteDispatchVideoMonitorByVideoMonitorIds(videoMonitorIds);
    }

    /**
     * 删除视频监控信息
     * 
     * @param videoMonitorId 视频监控主键
     * @return 结果
     */
    @Override
    public int deleteDispatchVideoMonitorByVideoMonitorId(Long videoMonitorId)
    {
        return dispatchVideoMonitorMapper.deleteDispatchVideoMonitorByVideoMonitorId(videoMonitorId);
    }
}
